<script>
export default {
  mainColor: '#f2f7ff',
  loadingStr: '正在努力加载...',
  statusName(val) { // 状态名字
    switch (val) {
      case 1:
        val = '待编辑'
        break
      case 2:
        val = '待上架'
        break
      case 3:
        val = '已上架'
        break
      case 4:
        val = '已下架'
        break
    }
    return val
  },
   educationList: [
    { id: "1", name: "小学" },
    { id: "2", name: "初中" },
    { id: "3", name: "高中" },
    { id: "4", name: "专科" },
    { id: "5", name: "本科" },
    { id: "6", name: "硕士" },
    { id: "7", name: "博士" }
  ],
    checkInputIsEmpty: function(rule, value, callback) {
    if (typeof value === 'undefined' || value.toString().trim() === '') {
      callback(new Error('必填项不能为空'))
    } else {
      callback()
    }
  },
}
</script>
